<template>

  <el-scrollbar>

    <div style="padding: 0px 16px;background-color: #fff;box-shadow: 0 2px 4px 0 rgba(121,146,185,0.54);
                margin-bottom: 10px;border-radius: 4px;">
      <div v-for="message in messageList" id="love-message-box">
        <div class="love-message-container">
          <div class="love-message-left">
            <img :src="message.user_img" alt="头像" class="message-user-img">
          </div>

          <div class="love-message-center">
            <span class="common-black-text">{{ message.user_name }}</span>
            <span class="common-grey-text"> 赞了你的视频</span>
            <span class="love-message-time common-grey-text">{{ message.time }}</span>
          </div>


          <div class="love-message-right">
            {{ message.target_name }}
          </div>
        </div>

        <div class="border-div">

        </div>
      </div>
    </div>

  </el-scrollbar>

</template>

<script setup>
import {ref} from "vue";

const props = defineProps(['user_id']);

const messageList = ref([
  {
    user_img: "https://i2.hdslb.com/bfs/face/45db0e5d57edc4828fd5e8f16d78ab0d3f540a19.jpg@46w_46h_1c.webp",
    user_id: "",
    user_name: "用户名",
    time: "2023-11-12",
    target: "video",
    target_id: "",
    target_name: "目标名"
  },
  {
    user_img: "2",
    user_id: "",
    user_name: "用户名",
    time: "2023-11-12",
    target: "video",
    target_id: "",
    target_name: "目标名"
  }
])

</script>

<style scoped>

#love-message-box{
  padding-top: 24px;
  padding-bottom: 24px;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.love-message-container{
  display: flex;
}

.love-message-left{
  width: 60px;
  height: 46px;
  flex-shrink: 0;
}

.message-user-img{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.love-message-center{
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  box-sizing: border-box;
}

.love-message-time{
  display: block;
  padding-top: 18px;
  font-size: 12px;
}

.love-message-right{
  width: 60px;
  height: 60px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 15px;
  max-height: 4.285714285714286em;
}

.border-div{
  display: block;
  width: calc(100% - 44px);
  height: 1px;
  border-bottom: 1px solid #e5e9ef;
  position: absolute;
  bottom: 0;
  left: 60px;
}

</style>